package com.mrjy.payment.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.mrjy.common.entity.VipPackageInfo;
import com.mrjy.payment.bo.IVipPackageInfoBo;

@Controller
@RequestMapping("payment/vipPackageInfo")
public class VipPackageInfoController{
	@Resource
	private IVipPackageInfoBo vipPackageInfoBo;
	
	/**
	 * 添加
	 * @return
	 */
	@RequestMapping("/add")
	@ResponseBody
	public Object add(VipPackageInfo info){
		return vipPackageInfoBo.txInsert(info);
	}
	/**
	 * 根据ID查询
	 * @return
	 */
	@RequestMapping("/queryById")	
	@ResponseBody
	public Object queryById(int id) {
		return vipPackageInfoBo.queryById(id);
	}
	/**
	 * 修改
	 * @param userInfo
	 * @return
	 */
	@RequestMapping("/edit")
	@ResponseBody
	public Object edit(VipPackageInfo info) {		
		return vipPackageInfoBo.txUpdateById(info);
	}
	
	/**
	 * 删除
	 * @param ids
	 * @return
	 */
	@RequestMapping("/deleteByIds")
	@ResponseBody
	public Object deleteByIds(int[] ids) {		
		return vipPackageInfoBo.deleteByIds(ids);
	}
	/**
	 * 禁用、起用
	 * @param ids
	 * @return
	 */
	@RequestMapping("/updateDisableFlag")
	@ResponseBody
	public Object updateDisableFlag(VipPackageInfo info) {		
		return vipPackageInfoBo.updateDisableFlag(info);
	}
	/**
	 * 后台查询vip会员套餐list
	 * @param ids
	 * @return
	 */
	@RequestMapping("/queryListForBack")
	@ResponseBody
	public Object queryListForBack(VipPackageInfo info) {		
		return vipPackageInfoBo.queryListForBack(info);
	}
	
	/**
	 * 微信端查询vip会员套餐list
	 * @param ids
	 * @return
	 */
	@RequestMapping("/queryList")
	@ResponseBody
	public Object queryList(VipPackageInfo vipPackageInfo) {		
		return vipPackageInfoBo.queryList(vipPackageInfo);
	}
	
}
